package week7.example;


//*******************************************************************************************
// Dictionary.java    Author:Duanzhixuan
//
//  Represents a dictionary, which is a book. Used to demonstrates inheritance.
//********************************************************************************************
public class Dictionary extends Book
{
private int definitions = 52500;

   //--------------------------------------------------------------------------
   //  Prints a message using both local and inherited values.
   //--------------------------------------------------------------------------
public double computeRatio()
{
    return (double) definitions/pages;
}
//----------------------------------------------------------------------------------
//  Definitions mutator.
//----------------------------------------------------------------------------------
public void setDefinitions(int numberDefinitions)
{
    definitions=numberDefinitions;
}

//-------------------------------------------------------------------------------------
//   Definitions accessor.
//--------------------------------------------------------------------------------------
public int getDefinitions()
{
    return definitions;
}
}
